﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category7
{
  public class MT747 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagDefinition U001B;
    private static SwiftTagSubItemDefinition U001C;
    private static SwiftTagDefinition U001D;
    private static SwiftTagDefinition U001E;
    private static SwiftTagDefinition U001F;

    [Description("Documentary Credit Number")]
    public Tag20 DocumentaryCreditNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0002);
      }
    }

    [Description("Documentary Credit Number")]
    public Tag20 Tag20_DocumentaryCreditNumber
    {
      get
      {
        return this.DocumentaryCreditNumber_20;
      }
    }

    [Description("Reimbursing Banks Reference")]
    public Tag21 ReimbursingBanksReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0004);
      }
    }

    [Description("Reimbursing Banks Reference")]
    public Tag21 Tag21_ReimbursingBanksReference
    {
      get
      {
        return this.ReimbursingBanksReference_21;
      }
    }

    [Description("Date Of The Original Authorisation To Reimburse")]
    public Tag30 DateOfTheOriginalAuthorisationToReimburse_30
    {
      get
      {
        return new Tag30((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0006);
      }
    }

    [Description("Date Of The Original Authorisation To Reimburse")]
    public Tag30 Tag30_DateOfTheOriginalAuthorisationToReimburse
    {
      get
      {
        return this.DateOfTheOriginalAuthorisationToReimburse_30;
      }
    }

    [Description("New Date Of Expiry")]
    public Tag31E NewDateOfExpiry_31E
    {
      get
      {
        return new Tag31E((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0008);
      }
    }

    [Description("New Date Of Expiry")]
    public Tag31E Tag31E_NewDateOfExpiry
    {
      get
      {
        return this.NewDateOfExpiry_31E;
      }
    }

    [Description("Increase of Documentary Credit Amount")]
    public Tag32B IncreaseOfDocumentaryCreditAmount_32B
    {
      get
      {
        return new Tag32B((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U000F);
      }
    }

    [Description("Increase of Documentary Credit Amount")]
    public Tag32B Tag32B_IncreaseOfDocumentaryCreditAmount
    {
      get
      {
        return this.IncreaseOfDocumentaryCreditAmount_32B;
      }
    }

    [Description("Decrease of Documentary Credit Amount")]
    public Tag33B DecreaseOfDocumentaryCreditAmount_33B
    {
      get
      {
        return new Tag33B((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0012);
      }
    }

    [Description("Decrease of Documentary Credit Amount")]
    public Tag33B Tag33B_DecreaseOfDocumentaryCreditAmount
    {
      get
      {
        return this.DecreaseOfDocumentaryCreditAmount_33B;
      }
    }

    [Description("New Documentary Credit Amount After Amendment")]
    public Tag34B NewDocumentaryCreditAmountAfterAmendment_34B
    {
      get
      {
        return new Tag34B((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0015);
      }
    }

    [Description("New Documentary Credit Amount After Amendment")]
    public Tag34B Tag34B_NewDocumentaryCreditAmountAfterAmendment
    {
      get
      {
        return this.NewDocumentaryCreditAmountAfterAmendment_34B;
      }
    }

    [Description("Percentage Credit Amount Tolerance")]
    public MT747.Tag39A PercentageCreditAmountTolerance_39A
    {
      get
      {
        return new MT747.Tag39A((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U0018);
      }
    }

    [Description("Percentage Credit Amount Tolerance")]
    public MT747.Tag39A Tag39A_PercentageCreditAmountTolerance
    {
      get
      {
        return this.PercentageCreditAmountTolerance_39A;
      }
    }

    [Description("Maximum Credit Amount")]
    public Tag39B MaximumCreditAmount_39B
    {
      get
      {
        return new Tag39B((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U001B);
      }
    }

    [Description("Maximum Credit Amount")]
    public Tag39B Tag39B_MaximumCreditAmount
    {
      get
      {
        return this.MaximumCreditAmount_39B;
      }
    }

    [Description("Additional Amounts Covered")]
    public Tag39C AdditionalAmountsCovered_39C
    {
      get
      {
        return new Tag39C((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U001D);
      }
    }

    [Description("Additional Amounts Covered")]
    public Tag39C Tag39C_AdditionalAmountsCovered
    {
      get
      {
        return this.AdditionalAmountsCovered_39C;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U001E);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    [Description("Narrative")]
    public Tag77A Narrative_77A
    {
      get
      {
        return new Tag77A((SwiftElement) this, 0, (SwiftDefinitionElement) MT747.U001F);
      }
    }

    [Description("Narrative")]
    public Tag77A Tag77A_Narrative
    {
      get
      {
        return this.Narrative_77A;
      }
    }

    public MT747()
      : base(true)
    {
    }

    public MT747(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT747.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT747.MessageDefinition = new SwiftMessageDefinition("MT747", "Amendment to an Authorisation to Reimburse");
      MT747.U0002 = new SwiftTagDefinition("DocumentaryCreditNumber_20", "Documentary Credit Number");
      MT747.U0002.TagName = ":20:";
      MT747.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT747.U0002.Elements.Add((SwiftDefinitionElement) MT747.U0003);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0002);
      MT747.U0004 = new SwiftTagDefinition("ReimbursingBanksReference_21", "Reimbursing Banks Reference");
      MT747.U0004.TagName = ":21:";
      MT747.U0004.Mandatory = false;
      MT747.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT747.U0004.Elements.Add((SwiftDefinitionElement) MT747.U0005);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0004);
      MT747.U0006 = new SwiftTagDefinition("DateOfTheOriginalAuthorisationToReimburse_30", "Date Of The Original Authorisation To Reimburse");
      MT747.U0006.TagName = ":30:";
      MT747.U0007 = new SwiftTagSubItemDefinition("Date", "Date");
      MT747.U0006.Elements.Add((SwiftDefinitionElement) MT747.U0007);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0006);
      MT747.U0008 = new SwiftTagDefinition("NewDateOfExpiry_31E", "New Date Of Expiry");
      MT747.U0008.TagName = ":31E:";
      MT747.U0008.Mandatory = false;
      MT747.U000E = new SwiftTagSubItemDefinition("Date", "Date");
      MT747.U0008.Elements.Add((SwiftDefinitionElement) MT747.U000E);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0008);
      MT747.U000F = new SwiftTagDefinition("IncreaseOfDocumentaryCreditAmount_32B", "Increase of Documentary Credit Amount");
      MT747.U000F.TagName = ":32B:";
      MT747.U000F.Mandatory = false;
      MT747.U0010 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT747.U000F.Elements.Add((SwiftDefinitionElement) MT747.U0010);
      MT747.U0011 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT747.U000F.Elements.Add((SwiftDefinitionElement) MT747.U0011);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U000F);
      MT747.U0012 = new SwiftTagDefinition("DecreaseOfDocumentaryCreditAmount_33B", "Decrease of Documentary Credit Amount");
      MT747.U0012.TagName = ":33B:";
      MT747.U0012.Mandatory = false;
      MT747.U0013 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT747.U0012.Elements.Add((SwiftDefinitionElement) MT747.U0013);
      MT747.U0014 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT747.U0012.Elements.Add((SwiftDefinitionElement) MT747.U0014);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0012);
      MT747.U0015 = new SwiftTagDefinition("NewDocumentaryCreditAmountAfterAmendment_34B", "New Documentary Credit Amount After Amendment");
      MT747.U0015.TagName = ":34B:";
      MT747.U0015.Mandatory = false;
      MT747.U0016 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT747.U0015.Elements.Add((SwiftDefinitionElement) MT747.U0016);
      MT747.U0017 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT747.U0015.Elements.Add((SwiftDefinitionElement) MT747.U0017);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0015);
      MT747.U0018 = new SwiftTagDefinition("PercentageCreditAmountTolerance_39A", "Percentage Credit Amount Tolerance");
      MT747.U0018.TagName = ":39A:";
      MT747.U0018.Mandatory = false;
      MT747.U0019 = new SwiftTagSubItemDefinition("Tolerance1", "Tolerance 1");
      MT747.U0018.Elements.Add((SwiftDefinitionElement) MT747.U0019);
      MT747.U001A = new SwiftTagSubItemDefinition("Tolerance2", "Tolerance 2");
      MT747.U0018.Elements.Add((SwiftDefinitionElement) MT747.U001A);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U0018);
      MT747.U001B = new SwiftTagDefinition("MaximumCreditAmount_39B", "Maximum Credit Amount");
      MT747.U001B.TagName = ":39B:";
      MT747.U001B.Mandatory = false;
      MT747.U001C = new SwiftTagSubItemDefinition("Code", "Code");
      MT747.U001B.Elements.Add((SwiftDefinitionElement) MT747.U001C);
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U001B);
      MT747.U001D = new SwiftTagDefinition("AdditionalAmountsCovered_39C", "Additional Amounts Covered");
      MT747.U001D.TagName = ":39C:";
      MT747.U001D.Mandatory = false;
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U001D);
      MT747.U001E = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT747.U001E.TagName = ":72:";
      MT747.U001E.Mandatory = false;
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U001E);
      MT747.U001F = new SwiftTagDefinition("Narrative_77A", "Narrative");
      MT747.U001F.TagName = ":77A:";
      MT747.U001F.Mandatory = false;
      MT747.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT747.U001F);
    }

    public class Tag39A : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("39A", value);
        }
      }

      internal Tag39A(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
